import { CaseConfigType } from '@shared';
import { BasicComponent } from './basic/basic.component';
import { EmptyComponent } from './empty/empty.component';
import { ExpandComponent } from './expand/expand.component';
import { FilterComponent } from './filter/filter.component';
import { Demo4Component } from './demo4/demo4.component';
import { Demo5Component } from './demo5/demo5.component';
import { HeaderGroupingComponent } from './header-grouping/header-grouping.component';
import { CustomFilterComponent } from './custom-filter/custom-filter.component';
import { PaginationComponent } from './pagination/pagination.component';
import { Demo11Component } from './demo11/demo11.component';
import { Demo12Component } from './demo12/demo12.component';
import { RowSelectionComponent } from './row-selection/row-selection.component';
import { CustomCheckboxComponent } from './custom-checkbox/custom-checkbox.component';
import { Demo15Component } from './demo15/demo15.component';
import { OperationComponent } from './operation/operation.component';
import { CheckboxSelectionComponent } from './checkbox-selection/checkbox-selection.component';
import { Demo19Component } from './demo19/demo19.component';
import { RemoteLoadDataComponent } from './remote-load-data/remote-load-data.component';
import { Demo21Component } from './demo21/demo21.component';
import { Demo22Component } from './demo22/demo22.component';
import { DragAndDropComponent } from './drag-and-drop/drag-and-drop.component';
import { Demo24Component } from './demo24/demo24.component';
import { ColDisplayComponent } from './col-display/col-display.component';
import { Demo26Component } from './demo26/demo26.component';
import { CustomAllOptionsComponent } from './custom-all-options/custom-all-options.component';
import { Demo28Component } from './demo28/demo28.component';
import { RowSelectionMaxComponent } from './row-selection-max/row-selection-max.component';
import { HeaderGroupingScrollingComponent } from './header-grouping-scrolling/header-grouping-scrolling.component';
import { AdvancedFilterTableComponent } from './advanced-filter-table/advanced-filter-table.component';
import { NormalScrollComponent } from './normal-scroll/normal-scroll.component';
import { ResizeAutoComponent } from './resize-auto/resize-auto.component';

export const TableConfig: CaseConfigType = {
  location: '表格 Table',
  description: `用于展示大量结构化数据，可对数据进行排序、筛选、分页、自定义等复杂操作。`,
  description_en: `Used to display large amounts of structured data, and can perform complex operations such as sorting, filtering, paging, and customization of data.`,
  component: [
    {
      demo: BasicComponent,
      codePath: 'showcase/table/basic/basic.component',
      demoTitle: '基本使用',
      demoTitle_en: 'Basic',
      demoDescription: `简单的表格，需要显示的字段或者内容少。`,
      demoDescription_en: `When there are few fields or contents to display, users can use headers + table contents.`,
    },
    {
      demo: EmptyComponent,
      codePath: 'showcase/table/empty/empty.component',
      demoTitle: '空表格',
      demoTitle_en: 'Empty',
      demoDescription: `无显示数据表格，可通过 lvNoResult 自定义空表格的图标和描述。`,
      demoDescription_en: `No data table is displayed, and the icon and description of the empty table can be customized through lvNoResult.`,
    },
    {
      demo: PaginationComponent,
      codePath: 'showcase/table/pagination/pagination.component',
      demoTitle: '表格分页',
      demoTitle_en: 'Table paging',
      demoDescription: '表格分页。',
      demoDescription_en: 'Table paging.',
    },
    {
      demo: Demo4Component,
      codePath: 'showcase/table/demo4/demo4.component',
      demoTitle: '表格排序',
      demoTitle_en: 'Table sort',
      demoDescription: `利用lvSortDirct将table和sort增加关联关系，不在手动管理sortChange然后触发变更table的data逻辑增加关联关系后，需要处理的方法依旧在本身实现的组件内部。这就是为什么清除sort排序时，调用的是sort的方法，而不是table.removeSort()当自动处理逻辑无法满足业务场景时，可以参考表格默认过滤。`,
      demoDescription_en: `Use lvSortDirct to increase the association between table and sort. After manually managing sortChange and then triggering the change of table data logic to increase the association relationship, the method to be processed is still inside the component itself. This is why when sorting is sorted, the sort method is called instead of table.removeSort(). When the automatic processing logic cannot satisfy the business scenario, you can refer to the table default filter.`,
    },
    {
      demo: Demo5Component,
      codePath: 'showcase/table/demo5/demo5.component',
      demoTitle: '远程数据表格排序',
      demoTitle_en: 'Remote data table sorting',
      demoDescription: '远程数据表格排序。',
      demoDescription_en: 'Remote data table sorting.',
    },
    {
      demo: FilterComponent,
      codePath: 'showcase/table/filter/filter.component',
      demoTitle: '过滤和排序',
      demoTitle_en: `Filter and sort`,
      demoDescription: `过滤：对某列数据进行过滤，通过设置 [lvShowFilter] 属性来指定过滤操作，[lvFilters] 指定过滤选项，[lvFilterMultiple] 指定多选和单选，[lvFilterSearch] 启用过滤选项支持搜索过滤，[lvFilterCheckAll] 启用过滤选项中有全选选项，[lvFilterAuto] 启用自动过滤，更多配置参见 API。
       排序：对某列数据进行排序，具体配置参见排序 Demo。`,
      demoDescription_en: `Filtering: Filter a certain column of data, specify the filtering operation by setting the [lvShowFilter] attribute, [lvFilters] specifies filtering options, [lvFilterMultiple] specifies multiple selection and single selection, [lvFilterSearch] enables filtering options to support search filtering, [lvFilterCheckAll] There is a select all option in the enable filtering option, [lvFilterAuto] enables automatic filtering, see API for more configuration.
       Sorting: Sort a certain column of data. For detailed configuration, see Sorting Demo.`,
    },
    {
      demo: CustomFilterComponent,
      codePath: 'showcase/table/custom-filter/custom-filter.component',
      demoTitle: '表格自定义过滤菜单',
      demoTitle_en: 'Custom filter menu of table',
      demoDescription: '表格自定义过滤菜单。',
      demoDescription_en: 'Custom filter menu of table.',
    },
    {
      demo: CheckboxSelectionComponent,
      codePath: 'showcase/table/checkbox-selection/checkbox-selection.component',
      demoTitle: 'checkbox多选',
      demoTitle_en: 'Checkbox',
      demoDescription: 'checkbox多选。',
      demoDescription_en: 'Checkbox.',
    },
    {
      demo: CustomCheckboxComponent,
      codePath: 'showcase/table/custom-checkbox/custom-checkbox.component',
      demoTitle: '自定义checkbox多选',
      demoTitle_en: 'Custom checkbox',
      demoDescription: '自定义checkbox多选。',
      demoDescription_en: 'Custom checkbox.',
    },
    {
      demo: CustomAllOptionsComponent,
      codePath: 'showcase/table/custom-all-options/custom-all-options.component',
      demoTitle: '自定义全选项',
      demoTitle_en: 'Customize all options',
      demoDescription: '',
      demoDescription_en: '',
    },
    {
      demo: Demo26Component,
      codePath: 'showcase/table/demo26/demo26.component',
      demoTitle: 'radioButton单选',
      demoTitle_en: 'RadioButton',
      demoDescription: 'radioButton单选。',
      demoDescription_en: 'RadioButton.',
    },
    {
      demo: RowSelectionComponent,
      codePath: 'showcase/table/row-selection/row-selection.component',
      demoTitle: '行选择',
      demoTitle_en: 'Row selecting',
      demoDescription: '行选择',
      demoDescription_en: 'Row selecting.',
    },
    {
      demo: RowSelectionMaxComponent,
      codePath: 'showcase/table/row-selection-max/row-selection-max.component',
      demoTitle: '行最大选择',
      demoTitle_en: 'Row maximum selection',
      demoDescription: '行最大选择限制',
      demoDescription_en: 'Row maximum selection limit.',
    },
    {
      demo: RemoteLoadDataComponent,
      codePath: 'showcase/table/remote-load-data/remote-load-data.component',
      demoTitle: '远程加载数据',
      demoTitle_en: 'Load data asynchronously',
      demoDescription: '从服务端读取并展现数据',
      demoDescription_en: 'Read and display data from the server.',
    },
    {
      demo: ColDisplayComponent,
      codePath: 'showcase/table/col-display/col-display.component',
      demoTitle: '列显示隐藏',
      demoTitle_en: 'Column display, Column hide',
      demoDescription: '列显示隐藏',
      demoDescription_en: 'Column display, Column hide',
    },
    {
      demo: NormalScrollComponent,
      codePath: 'showcase/table/normal-scroll/normal-scroll.component',
      demoTitle: '普通滚动',
      demoTitle_en: 'Normal scrolling',
      demoDescription: '如果不是resize场景，需要th和td都配置列宽',
      demoDescription_en: 'In non-resize scenarios, both th and td need to be configured with the column width.',
    },
    {
      demo: Demo11Component,
      codePath: 'showcase/table/demo11/demo11.component',
      demoTitle: '虚拟滚动',
      demoTitle_en: 'Virtual scrolling',
      demoDescription: '虚拟滚动',
      demoDescription_en: 'Virtual scrolling.',
    },
    {
      demo: Demo21Component,
      codePath: 'showcase/table/demo21/demo21.component',
      demoTitle: '表格尺寸',
      demoTitle_en: 'Size',
      demoDescription: '表格尺寸',
      demoDescription_en: 'Size.',
    },
    {
      demo: ExpandComponent,
      codePath: 'showcase/table/expand/expand.component',
      demoTitle: '表格下展',
      demoTitle_en: 'Table downward extension',
      demoDescription: '表格下展，下展列表可嵌套文本或表格',
      demoDescription_en: 'Table downward extension The extended table can be nested with text and table.',
    },
    {
      demo: Demo28Component,
      codePath: 'showcase/table/demo28/demo28.component',
      demoTitle: '单元格高亮',
      demoTitle_en: 'show More',
      demoDescription: '查看详情时，对应的行数据或单元格数据需要高亮，作用指向',
      demoDescription_en: '',
    },
    {
      demo: Demo24Component,
      codePath: 'showcase/table/demo24/demo24.component',
      demoTitle: '固定列',
      demoTitle_en: 'Fixed column',
      demoDescription: '固定列',
      demoDescription_en: 'Fixed column.',
    },
    {
      demo: Demo12Component,
      codePath: 'showcase/table/demo12/demo12.component',
      demoTitle: '固定头和列',
      demoTitle_en: 'Fixed header and columns',
      demoDescription: '固定头和列',
      demoDescription_en: 'Fixed header and columns.',
    },
    {
      demo: HeaderGroupingComponent,
      codePath: 'showcase/table/header-grouping/header-grouping.component',
      demoTitle: '表头分组',
      demoTitle_en: 'Headers grouping',
      demoDescription: '两层以上的表头建议添加 lvBordered 属性',
      demoDescription_en: 'It is recommended that the lvBordered attribute be added to the table headers of more than two levels.',
    },
    {
      demo: HeaderGroupingScrollingComponent,
      codePath: 'showcase/table/header-grouping-scrolling/header-grouping-scrolling.component',
      demoTitle: '表头分组滚动',
      demoTitle_en: 'Table Header Group Scrolling',
      demoDescription: '两层以上的表头建议添加 lvBordered 属性, 表头分组滚动不支持colgroup配置需要使用select=colgroupTpl的template进行包裹',
      demoDescription_en: 'You are advised to add the lvBordered attribute to the table headers of more than two levels. The table header group scrolling does not support the colgroup configuration. You need to use the template of select=colgroupTpl to wrap the table headers.',
    },
    {
      demo: Demo22Component,
      codePath: 'showcase/table/demo22/demo22.component',
      demoTitle: '内容显示方式',
      demoTitle_en: 'overflow tips',
      demoDescription: `内容显示方式`,
      demoDescription_en: 'When the content is too long, the text is processed... and the tip prompts',
    },
    {
      demo: Demo15Component,
      codePath: 'showcase/table/demo15/demo15.component',
      demoTitle: '可编辑',
      demoTitle_en: 'Editable',
      demoDescription: '可编辑的表格',
      demoDescription_en: 'Editable table.',
    },
    {
      demo: OperationComponent,
      codePath: 'showcase/table/operation/operation.component',
      demoTitle: '表格操作',
      demoTitle_en: 'Table operation',
      demoDescription: '表格操作',
      demoDescription_en: 'Table operation.',
    },
    {
      demo: Demo19Component,
      codePath: 'showcase/table/demo19/demo19.component',
      demoTitle: '拖拽调整列宽',
      demoTitle_en: 'Drag to adjust column width - Experiment',
      demoDescription: '拖拽调整列宽',
      demoDescription_en: 'Drag to adjust column width.',
    },
    {
      demo: ResizeAutoComponent,
      codePath: 'showcase/table/resize-auto/resize-auto.component',
      demoTitle: '缩放窗口列宽自适应',
      demoTitle_en: 'Auto-adaptation of the column width of the resize',
      demoDescription: '单列不固定列宽时缩小后应有最小宽度',
      demoDescription_en: 'The width of a single column is not fixed. The width must be the minimum after the column is reduced.',
      devDebug: true,
    },
    {
      demo: DragAndDropComponent,
      codePath: 'showcase/table/drag-and-drop/drag-and-drop.component',
      demoTitle: '拖放',
      demoTitle_en: 'Drag and Drop',
      demoDescription: '拖放',
      demoDescription_en: 'Drag and Drop',
    },
    {
      demo: AdvancedFilterTableComponent,
      codePath: 'showcase/table/advanced-filter-table/advanced-filter-table.component',
      demoTitle: '综合筛选器与表格筛选器的联动',
      demoTitle_en: 'Linkage of advanced filter and table filter',
      demoDescription: '与表格筛选器的联动。',
      demoDescription_en: 'Linkage with table filters.',
    },
  ],
  useRule: [],
  useSuggestion: ['设置列宽时使用width进行设置'],
  snippet: `
    <lv-datatable [lvData]='\${1:data}' #lvTable>
      <thead>
        <tr>
          <th>\${2:Id}</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor='\${3:let item of lvTable.renderData}'>
          <td>{{\${4:item.id}}}</td>
        </tr>
      </tbody>
    </lv-datatable>
    `,
  mApi: [
    {
      name: 'lv-datatable',
      name_en: 'lv-datatable',
      selector: 'lv-datatable',
      api: [
        {
          attribute: 'lvKey',
          type: 'any',
          default: '',
          description: '唯一标识',
          description_en: 'unique id',
        },
        {
          attribute: 'lvData',
          type: 'any[]',
          default: '[]',
          description: '源数据',
          description_en: 'data',
        },
        {
          attribute: 'lvAsync',
          type: 'boolean',
          default: 'false',
          description: '是否为异步数据表格, 即后台表格',
          description_en: 'Whether is asynchronous data table.(backend table)',
        },
        {
          attribute: 'lvSortDirct',
          type: 'SortDirective',
          default: '',
          description: '关联sort指令，sortChange自动触发table数据变更',
          description_en: 'Associated with sort instruction, sortChange automatically triggers data change of the table.',
        },
        {
          attribute: 'lvPaginator',
          type: 'PaginatorComponent',
          default: '',
          description: '关联paginator组件，pageChange自动触发table数据变更',
          description_en: 'Associated with paginator component, pageChange automatically triggers data change of the table.',
        },
        // {
        //   attribute: 'lvStripe',
        //   type: 'boolean',
        //   default: 'false',
        //   description: '是否展示斑马纹',
        //   description_en: 'Whether to display zebra-tripe',
        // },
        {
          attribute: 'lvBordered',
          type: 'boolean',
          default: 'false',
          description: '是否展示外边框和列边框',
          description_en: 'Indicates whether to display the outer border and column border.',
        },
        {
          attribute: 'lvSize',
          type: '"default" | "large" | "small"',
          default: 'default',
          description: '表格大小',
          description_en: 'Size of the table',
        },
        {
          attribute: 'lvScroll',
          type: '{x?: string | null, y?: string | null, autosize?: boolean}',
          default: `{
            x: null,
            y: null,
            autosize: false
          }`,
          description:
            '横向或纵向支持滚动，也可用于指定滚动区域的宽高度：{ x: "300px", y: "300px" }, autosize配置当 scroll.y > tbody.height, 是否自动按内容适配高度。',
          description_en:
            'Rolling horizontally or vertically is supported. It can also be used to specify the width and height of rolling area: {x: "300px", x: "300px"}, autosize: specifies whether to automatically adapt the height based on content when scroll.y is greater than tbody.height.',
        },
        {
          attribute: 'lvNoResult',
          type: '{ icon?: string; description?: string | TemplateRef<void> }',
          default: `{
            icon: 'lv-icon-no-data',
            description: this.i18n.get('emptyTable'),
          }`,
          description: '无数据时显示内容',
          description_en: 'Display content when there is no data',
        },
        {
          attribute: 'lvSelectionMode',
          type: '"single" | "multiple"',
          default: '"single"',
          description: '选择模式',
          description_en: 'Mode of selection',
        },
        {
          attribute: 'lvSelection',
          type: 'any[]',
          default: '[]',
          description: '双向绑定，默认选中项',
          description_en: 'Two-way binding, which is selected items by default',
        },
        {
          attribute: 'lvVirtualScroll',
          type: 'boolean',
          default: 'false',
          description: '是否支持虚拟滚动',
          description_en: 'Whether to support virtual scroll',
        },
        {
          attribute: 'lvVirtualItemSize',
          type: 'number',
          default: '40',
          description: '虚拟滚动时每一列的高度',
          description_en: 'Height of each column during virtual scroll',
        },
        {
          attribute: 'lvVirtualMaxBuffer',
          type: 'number',
          default: '200',
          description: '缓冲区最大像素高度',
          description_en: 'Maximum pixel height of buffer',
        },
        {
          attribute: 'lvVirtualMinBuffer',
          type: 'number',
          default: '100',
          description: '缓冲区最小像素高度',
          description_en: 'Minimum pixel height of buffer',
        },
        {
          attribute: 'lvResize',
          type: 'boolean',
          default: 'false',
          description: '是否支持表头拖动改变列宽',
          description_en: 'Whether to support drag the header to change column width',
        },
        {
          attribute: 'lvResizeMode',
          type: `'fit' | 'expand'`,
          default: 'fit',
          description:
            '有两种调整大小模式； fit和expand。 fit是默认值，当调整列的大小时，表格的整体宽度不会改变。在expand模式下，表的宽度也会随着列的宽度而变化。',
          description_en:
            'There are two resize modes; "fit" and "expand". Fit is the default one and the overall table width does not change when a column is resized. In "expand" mode, table width also changes along with the column width.',
        },
        {
          attribute: 'lvResizeMinWidth',
          type: 'number',
          default: '96',
          description: '拖动改变的最小宽度。',
          description_en: 'Minimum width of resize.',
          global: true,
        },
        {
          attribute: 'lvFake',
          type: 'boolean',
          default: '',
          description: '是否为傀儡table，如果为true表格无数据将不显示',
          description_en: 'Whether is fake table. If the value equals to true, table with no data will not be displayed.',
        },
        {
          attribute: 'lvVirtualTrackBy',
          type: 'TrackByFunction<any>',
          default: '',
          description: '虚拟滚动的trackBy',
          description_en: 'virtual scrolling trackBy.',
        },
        {
          attribute: 'lvMultiGroup',
          type: 'boolean',
          default: 'false',
          description: '是否是表头分组表格',
          description_en: 'Whether it is a header grouping table.',
        },
        {
          attribute: 'lvCompareWith',
          type: 'string | ((o: any) => any)',
          default: '',
          description: 'data被选中的比较方式，默认value地址比较, o 为value',
          description_en: 'Data comparison method selected, default value address comparison, o is value.',
        },
      ],
      event: [
        {
          event: 'lvStateChange',
          parameter: ``,
          description: '表格条件变更回调',
          description_en: 'Table condition change back',
        },
        {
          event: 'lvSelectionChange',
          parameter: ``,
          description: '表格选中值变更回调',
          description_en: 'Table selected value change back',
        },
        {
          event: 'lvScrollEnd',
          parameter: ``,
          description: '虚拟滚动到底部时回调事件',
          description_en: 'Callback event when virtual scrolling to the bottom.',
        },
        {
          event: 'lvScrollingChange',
          parameter: ``,
          description: '虚拟滚动中回调事件',
          description_en: 'Virtual scrolling callback event.',
        },
      ],
    },
    {
      name: 'td',
      name_en: 'td',
      selector: 'td',
      api: [
        {
          attribute: 'lvAlign',
          type: `'left' | 'right'`,
          default: 'left',
          description: '标题对齐方式',
          description_en: 'Alignment of title',
        },
        {
          attribute: 'lvLeft',
          type: 'string| boolean',
          default: 'left',
          description: '固定列相对于左对齐，等于false时不生效',
          description_en: 'Fixed columns are aligned relative to the left. This parameter does not take effect when it is set to false.',
        },
        {
          attribute: 'lvRight',
          type: 'string| boolean',
          default: 'left',
          description: '固定列相对于右对齐，等于false时不生效',
          description_en: 'Fixed columns are aligned relative to the right. This parameter does not take effect when it is set to false.',
        },
        {
          attribute: 'lvShowUnfold',
          type: 'boolean',
          default: 'false',
          description: '是否显示展开详情icon',
          description_en: 'Whether to show icons of unfolding',
        },
        {
          attribute: 'lvUnfold',
          type: 'boolean',
          default: 'false',
          description: '展开子项状态,支持双向绑定',
          description_en: 'Status of unfolded subitems, support two-way binding.',
        },
        {
          attribute: 'lvInnerUnfold',
          type: 'boolean',
          default: 'false',
          description: '是否为内嵌的内容',
          description_en: 'Whether is nested contant.',
        },
        {
          attribute: 'lvUnfoldEdit',
          type: 'boolean',
          default: 'false',
          description: '是否为复杂编辑状态',
          description_en: 'Whether is the status of complex editing',
        },
        {
          attribute: 'lvUnfoldToggleIcon',
          type: ' { true?: string; false?: string } | string',
          default: ` { true: 'triangle-down', false: 'triangle-up' }`,
          description: '展开详情切换icon',
          description_en: 'Whether to show icons of toggling',
        },
        {
          attribute: 'lvShowExpanded',
          type: 'boolean',
          default: 'false',
          description: '是否显示展开子项icon',
          description_en: 'Whether to show icons of unfolding subitems',
        },
        {
          attribute: 'lvExpanded',
          type: 'boolean',
          default: 'false',
          description: '展开子项状态,支持双向绑定',
          description_en: 'Status of unfolding subitems, support two-way binding.',
        },
        {
          attribute: 'lvExpandedToggleIcon',
          type: '{ true?: string; false?: string } | string',
          default: `{ true: 'lv-icon-treetable-unfold', false: 'lv-icon-treetable-fold'  }`,
          description: '展开子项切换icon',
          description_en: 'Icon of toggling unfolded subitems',
        },
        {
          attribute: 'lvShowCheckbox',
          type: 'boolean',
          default: 'false',
          description: '是否展示复选选框',
          description_en: 'Whether to show checkbox-selection',
        },
        {
          attribute: 'lvDisabled',
          type: 'boolean',
          default: 'false',
          description: '复选框是否可点',
          description_en: 'Whether to disable checkbox-selection',
        },
        {
          attribute: 'lvCheckboxTip',
          type: 'string',
          default: '',
          description: '复选框提示信息',
          description_en: 'Check box prompt message',
        },
        {
          attribute: 'lvRowData',
          type: '{ [key: string]: any }',
          default: '',
          description: '行数据',
          description_en: 'Row data',
        },
        {
          attribute: 'lvPaddingLeft',
          type: 'number | string',
          default: '0px',
          description: '自定义左边距，用于树表场景',
          description_en: 'Custom left margin, which is used for tree table scenarios.',
        },
      ],
      event: [
        {
          event: 'lvUnfoldChange',
          parameter: ``,
          description: '展开详情回调事件',
          description_en: 'Callback to Expand details local events',
        },
      ],
    },
    {
      name: 'th',
      name_en: 'th',
      selector: 'th',
      api: [
        {
          attribute: 'lvCellKey',
          type: 'string',
          default: '',
          description: '列主键',
          description_en: 'Column primary key',
        },
        {
          attribute: 'lvAlign',
          type: `'left' | 'right'`,
          default: 'left',
          description: '标题对齐方式',
          description_en: 'Alignment of title',
        },
        {
          attribute: 'lvLeft',
          type: 'string| boolean',
          default: 'left',
          description: '固定列相对于左对齐，等于false时不生效',
          description_en: 'Fixed columns are aligned relative to the left. This parameter does not take effect when it is set to false.',
        },
        {
          attribute: 'lvRight',
          type: 'string| boolean',
          default: 'left',
          description: '固定列相对于右对齐，等于false时不生效',
          description_en: 'Fixed columns are aligned relative to the right. This parameter does not take effect when it is set to false.',
        },
        {
          attribute: 'lvShowCheckbox',
          type: 'boolean',
          default: 'false',
          description: '是否展示复选框',
          description_en: 'Whether to show checkbox-selection',
        },
        {
          attribute: 'lvResizable',
          type: 'boolean',
          default: 'true',
          description: '列是否可拖动',
          description_en: 'Whether a column can be dragged',
        },
        {
          attribute: 'lvDisabled',
          type: 'boolean',
          default: 'false',
          description: '复选框是否可点',
          description_en: 'Whether to disable checkbox-selection',
        },
        {
          attribute: 'lvCheckboxTip',
          type: 'string',
          default: '',
          description: '复选框提示信息',
          description_en: 'Check box prompt message',
        },
        {
          attribute: 'lvRowsData',
          type: '{ [key: string]: any }[]',
          default: '',
          description: '渲染页可点击行数据,默认为renderData',
          description_en: 'Users can click the row data in the rendering page, and the default value is renderdata',
        },
        {
          attribute: 'lvShowSort',
          type: 'boolean',
          default: 'false',
          description: '是否展示排序按钮',
          description_en: 'Whether to display sort button',
        },
        {
          attribute: 'lvDefaultSort',
          type: 'PureSort',
          default: 'asc',
          description: '排序切换从什么序开始,默认先从升序开始',
          description_en: 'Sorting starts from what order, the default starts with ascending order',
        },
        {
          attribute: 'lvSortDirection',
          type: 'SortDirection',
          default: '',
          description: '关联排序组件',
          description_en: 'Associated sorting component',
        },
        {
          attribute: 'lvCustomSort',
          type: '<T>(data: T[] | null, sort: SortConfig) => T[] | null',
          default: '',
          description: '自定义排序',
          description_en: 'Custom sort',
        },
        {
          attribute: 'lvDisableSortClear',
          type: 'boolean',
          default: '--',
          description: '点击排序按钮，是否禁用清除排序',
          description_en: 'Whether sorting cannot be cleared when click sort button',
          global: true,
        },
        {
          attribute: 'lvKeepWhiteSpace',
          type: 'boolean',
          default: '--',
          description: '表格单元格字符是否保留多个空格，若LvConfig.dataTableOptions配置为true，配置了overflow属性的也会保留多个空格',
          description_en:
            'Indicates whether to retain multiple spaces in a table cell. If LvConfig.dataTableOptions is set to true, multiple spaces are retained if the overflow attribute is configured.',
          global: true,
        },
        {
          attribute: 'lvShowFilter',
          type: 'boolean',
          default: 'false',
          description: '是否展示过滤按钮',
          description_en: 'Whether to display filter button',
        },
        {
          attribute: 'lvFilters',
          type: 'FilterItem[]',
          default: '[]',
          description: '过滤的条件',
          description_en: 'Condition of filter.',
        },
        {
          attribute: 'lvCustomFilter',
          type: `<T>(data: T[] | null, filter: FilterConfig) => T[] | null`,
          default: '',
          description: '根据全部数据自定义过滤',
          description_en: 'Custom filtering based on all data.',
        },
        {
          attribute: 'lvCustomItemFilter',
          type: `<T>(data: T | null, filter: FilterConfig) => boolean`,
          default: '',
          description: '根据单项数据自定义过滤',
          description_en: 'Custom filtering based on individual data.',
        },
        {
          attribute: 'lvFilterMode',
          type: `'contains' | 'endsWith' | 'startsWith' | 'equals' | 'in' | 'timeIn' | 'rangeIn'`,
          default: 'startsWith',
          description: '过滤模式',
          description_en: 'Filter mode.',
        },
        {
          attribute: 'lvFilterCaseSensitive',
          type: 'boolean',
          default: 'false',
          description: '过滤是否关心大小写',
          description_en: 'Whether filtering cares about case',
        },
        {
          attribute: 'lvFilterMultiple',
          type: 'boolean',
          default: 'true',
          description: '单选或多选过滤',
          description_en: 'Single or multiple selection filtering',
        },
        {
          attribute: 'lvFilterAuto',
          type: 'boolean',
          default: 'false',
          description: '自动过滤，默认多选手动，单选自动',
          description_en: 'Automatic filtering, both manual selection and single selection automatic',
        },
        {
          attribute: 'lvFilterSearch',
          type: 'boolean',
          default: 'false',
          description: '过滤列表是否支持过滤',
          description_en: 'Whether the filtering list supports search',
        },
        {
          attribute: 'lvFilterCheckAll',
          type: 'boolean',
          default: 'false',
          description: '过滤是否支持全选，多选模式下有效',
          description_en: 'Whether the filter supports all-selection and is valid in multi-select mode',
        },
        {
          attribute: 'lvFilterVirtualScroll',
          type: 'boolean',
          default: 'false',
          description: '是否使用虚拟滚动（大数据场景使用）',
          description_en: 'Whether to use virtual scrolling (used in big data scenes).'
        },
        {
          attribute: 'lvFilterBeforeOpen',
          type: 'fn',
          default: '-',
          description: '打开过滤列表前的回调函数，执行异步事件时promise，返回值为false可阻止打开。',
          description_en: 'Open the callback function before the filtering list, perform the asynchronous event when the promise, return value is false to prevent opening.'
        },
        {
          attribute: 'lvFilterVirtualItemSize',
          type: 'number',
          default: '32',
          description: '每行高度。',
          description_en: `The height of each row. When lvSize is large.`,
        },
        {
          attribute: 'lvFilterVirtualMaxBuffer',
          type: 'number',
          default: '200',
          description: '渲染新项时最大缓冲高度',
          description_en: 'Maximum buffer height when rendering new items.',
        },
        {
          attribute: 'lvFilterVirtualMinBuffer',
          type: 'number',
          default: '100',
          description: '缓冲区最小像素高度',
          description_en: 'Minimum pixel height of buffer',
        },
        {
          attribute: 'lvFilterAsync',
          type: 'boolean',
          default: 'false',
          description: '是否为异步数据.',
          description_en:
            'Is it asynchronous data. When using the lvAsync attribute.',
        },
        {
          attribute: 'lvFilterSearchAsync',
          type: 'boolean',
          default: 'false',
          description: '是否为异步过滤',
          description_en: 'Is it asynchronous filtering.',
        },
        {
          attribute: 'lvShowTips',
          type: 'boolean',
          default: 'false',
          description: '是否展示提示按钮',
          description_en: 'Whether to display prompt button',
        },
        {
          attribute: 'lvShowCustom',
          type: 'boolean',
          default: 'false',
          description: '是否展示自定义头',
          description_en: '	Whether to display custom header',
        },
      ],
      event: [
        {
          event: 'lvCheckChange',
          parameter: ``,
          description: '返回选中项',
          description_en: 'Return selected items',
        },
        {
          event: 'lvFilterChange',
          parameter: ``,
          description: '触发filter变化回调函数',
          description_en: 'Trigger callback function of filter.',
        },
        {
          event: 'lvFilterScrollEnd',
          parameter: ``,
          description: '虚拟滚动到底部时回调事件。',
          description_en: 'Callback event when virtual scrolling to the bottom.',
        },
        {
          event: 'lvFilterScrollingChange',
          parameter: ``,
          description: '虚拟滚动中回调事件',
          description_en: 'Virtual scrolling callback event.',
        },
        {
          event: 'lvFilterSearchChange',
          parameter: ``,
          description: '搜索变化时回调事件, 在虚拟滚动生效',
          description_en: 'Callback event triggered when the search changes, which takes effect during virtual scrolling.',
        },
      ],
    },
    {
      name: 'tr',
      name_en: 'tr',
      selector: 'tr',
      api: [
        {
          attribute: 'lvInnerUnfold',
          type: 'boolean',
          default: 'false',
          description: '是否为展开的行',
          description_en: 'Whether is unfolded row',
        },
        {
          attribute: 'lvUnfoldEdit',
          type: 'boolean',
          default: 'false',
          description: '是否为复杂编辑状态',
          description_en: 'Whether is in complex editable status',
        },
      ],
      event: [],
    },
  ],
  method: [
    {
      name: 'getSelection()',
      demoDescription: '获取全部选中项-全部',
      demoDescription_en: 'Get all selected items - all.',
    },
    {
      name: 'getRenderSelection()',
      demoDescription: '获取当前渲染项选中项-当前渲染',
      demoDescription_en: 'Get the current render item selected item - current rendering.',
    },
    {
      name: 'toggleSelection(value: any)',
      demoDescription: '切换选择项',
      demoDescription_en: 'Switch selections.',
    },
    {
      name: 'bulkSelection(values:any[])',
      demoDescription: '批量选中项',
      demoDescription_en: 'Batch selection.',
    },
    {
      name: 'clearSelection()',
      demoDescription: '清除所有-全部',
      demoDescription_en: 'Clear all - all.',
    },
    {
      name: 'clearRenderSelection()',
      demoDescription: '清除所有-渲染渲染',
      demoDescription_en: 'Clear all - render rendering.',
    },
    {
      name: 'deleteSelection(values: any[])',
      demoDescription: '批量删除项',
      demoDescription_en: 'Delete items in bulk.',
    },
    {
      name: 'isSelected(value: any)',
      demoDescription: '是否选中',
      demoDescription_en: 'Whether to select.',
    },
    {
      name: 'updateSelection()',
      demoDescription: '更新表格selection',
      demoDescription_en: 'Update form selection.',
    },
  ],
};
